package com.WOWTradeNews.phone;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import com.WOWTradeNewsTest.R;

public class TradeNewsPhone extends Activity {
	private ImageView menu01,menu02,menu03,menu04,menu05;
	private ImageView favorites;
	private ImageView help_back;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_phone);
        
        Log.d("zhaosdfa", "onCreate---suc------>>>>");
        
		menu01 = (ImageView) findViewById(R.id.menu01);
		menu02 = (ImageView) findViewById(R.id.menu02);
		menu03 = (ImageView) findViewById(R.id.menu03);
		menu04 = (ImageView) findViewById(R.id.menu04);
		menu05 = (ImageView) findViewById(R.id.menu05);
		
		favorites = (ImageView) findViewById(R.id.favorites);
		help_back = (ImageView) findViewById(R.id.help_black);
		
		menu01.setOnClickListener(new ImageView.OnClickListener(){
			@Override
			public void onClick(View arg0) {
				Intent i = new Intent();
				i.setClass(TradeNewsPhone.this, TradeNewsList.class);
				Bundle bundle = new Bundle();
				bundle.putString("type", "4");
				bundle.putString("subject", "活動快訊");
				i.putExtras(bundle);
				startActivity(i);
			}
		});
		menu02.setOnClickListener(new ImageView.OnClickListener(){
			@Override
			public void onClick(View arg0) {
				Intent i = new Intent();
				i.setClass(TradeNewsPhone.this, TradeNewsList.class);
				Bundle bundle = new Bundle();
				bundle.putString("type", "3");
				bundle.putString("subject", "商情放送");
				i.putExtras(bundle);
				startActivity(i);
			}
		});
		menu03.setOnClickListener(new ImageView.OnClickListener(){
			@Override
			public void onClick(View arg0) {
				Intent i = new Intent();
				i.setClass(TradeNewsPhone.this, TradeNewsList.class);
				Bundle bundle = new Bundle();
				bundle.putString("type", "2");
				bundle.putString("subject", "專題研析");
				i.putExtras(bundle);
				startActivity(i);
			}
		});
		menu04.setOnClickListener(new ImageView.OnClickListener(){
			@Override
			public void onClick(View arg0) {
				Intent i = new Intent();
				i.setClass(TradeNewsPhone.this, TradeNewsList.class);
				Bundle bundle = new Bundle();
				bundle.putString("type", "1");
				bundle.putString("subject", "市調精華");
				i.putExtras(bundle);
				startActivity(i);
			}
		});
		menu05.setOnClickListener(new ImageView.OnClickListener(){
			@Override
			public void onClick(View arg0) {
				Intent i = new Intent();
				i.setClass(TradeNewsPhone.this, TradeNewsList.class);
				Bundle bundle = new Bundle();
				bundle.putString("type", "5");
				bundle.putString("subject", "經貿書訊");
				i.putExtras(bundle);
				startActivity(i);
			}
		});
		
		favorites.setOnClickListener(new ImageView.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(TradeNewsPhone.this, TradeNewsList.class);
				Bundle bundle = new Bundle();
				bundle.putString("type","6");
				bundle.putString("subject", "我的最愛");
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		
		help_back.setOnClickListener(new ImageView.OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(TradeNewsPhone.this, HelpBack.class);
				startActivity(intent);
			}
			
		});
    }
}